package com.kayo.specimen.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.validation.Validation;
import javax.validation.Validator;
import javax.validation.ValidatorFactory;

@Configuration
public class ValidateConfig {
    @Bean
    public Validator getValidator(){
        ValidatorFactory validatorFactory= Validation.byDefaultProvider()
                .configure()
                .buildValidatorFactory();
        return validatorFactory.getValidator();
    }
}
